import 'package:flutter/material.dart';

class Widget_SizedBox_Page extends StatefulWidget {
  @override
  State<StatefulWidget> createState() {
    return Widget_SizedBox_State();
  }
}

class Widget_SizedBox_State extends State<Widget_SizedBox_Page> {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
          appBar: AppBar(title: Text("SizedBox"),),
          body:SizedBox(
            width: 100.0,
            height: 100.0,
            child:  Container(
              width: 200.0,
              height: 200.0,
              color: Color(0xffff0000),
            ),
          )
      ),
    );
  }
}

/**
 * 能强制子控件具有特定宽度、高度或两者都有,使子控件设置的宽高失效
 * const SizedBox({
 * Key key,
 * this.width,
 * this.height,
 * Widget child
 * })
 * */